{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "poly_path = r'D:\\shengtai\\八月任务\\我的任务\\449_早熟禾草甸'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "savelist=[]\n",
    "import os\n",
    "pathList9 = []\n",
    "path = poly_path\n",
    "def enumeration(dirname):\n",
    "    for root,dirs,files in os.walk(dirname):        \n",
    "        for file in files:            \n",
    "\n",
    "            if file.endswith(\".mxd\") and not savelist:\n",
    "                print(os.path.join(root,file))\n",
    "                savelist.append( file.split(\"_\")[0])\n",
    "                savelist.append( file.split(\"_\")[1])\n",
    "\n",
    "\n",
    "                \n",
    "            pathList9.append(os.path.join(root,file))\n",
    "        for dir in dirs:            \n",
    "            enumeration(dir)     \n",
    "            \n",
    "enumeration(path)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
